package com.twu.biblioteca.libraryitems;

import com.twu.biblioteca.Customer;

/**
 * Created by sarahc on 1/14/14.
 */
public abstract class LibraryItem {

    private int id;
    private Customer currentCustomer;

    private static int idCount = 1;

    public LibraryItem(){
        this.id = idCount;
        this.setCurrentCustomer(null);
        idCount++;
    }

    public int getId() {
        return id;
    }

    public boolean isAvailable() {
        return currentCustomer == null;
    }

    public void setCurrentCustomer(Customer customer) {
        this.currentCustomer = customer;
    }

    public Customer getCurrentCustomer(){
        return this.currentCustomer;
    }

    public void removeCurrentCustomer(){
        this.currentCustomer = null;
    }




}
